<?php

/* 
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/

// Route::get('/', function(){
//     return view('welcome');
// });


//后台路由组
Route::group(['middleware'=>'AdminLogin'],function(){
	//后台首页路由
	Route::controller('/admin/index','admin\IndexController');

	//后台用户管理路由
	Route::controller('/admin/user', 'admin\UserController');

	//后台分类管理路由
	Route::controller('/admin/cate', 'admin\CateController');

	//后台商品管理路由
	Route::controller('/admin/goods', 'admin\GoodsController');

	//后台评论管理路由
	Route::controller('/admin/comment', 'admin\CommentController');

	//后台轮播控制器
	Route::controller('/admin/lunbo','admin\LunboController');

	//后台友情链接控制器
	Route::controller('/admin/link','admin\LinkController');

	//后台限时品牌控制器
	Route::controller('/admin/brand','admin\BrandController');

	//后台留言控制器
	Route::controller('/admin/jianyi','admin\JianyiController');
});

//后台登录
Route::controller('/admin/login', 'admin\LoginController');



Route::get('/','home\IndexController@index');

//前台  首页数据以及layout方法
Route::controller('/index', 'home\IndexController');

//前台登录控制器
Route::controller('/home/login', 'home\LoginController');

//前台商品详情控制器
Route::controller('/goods', 'home\GoodsController');

//商品列表页控制器
Route::controller('/list','home\ListController');

Route::group(['middleware'=>'HomeLogin'],function(){
	//收藏管理
	Route::controller('/home/collect','home\CollectController');

	//前台个人中心控制器
	Route::controller('/home/umessage','home\UsermessageController');


});




	